import 'dart:io';

import 'package:dio/dio.dart';

import '../util/http_util.dart';

class PublicApi {
  static Future<Response> getChinaAddressById(dynamic data) {
    return HttpUtil.getDio()
        .post("/liveStaff/common/get_sys_china_by_pid", data: data);
  }

  static Future<Response> fileUpload(File file) {
    FormData formData =
        FormData.fromMap({"file": MultipartFile.fromFileSync(file.path)});
    return HttpUtil.getDio()
        .post("liveStaff/upload/fileupload", data: formData);
  }
}
